<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>SPI Driver: drv/spi_drv.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SPI Driver
   &#160;<span id="projectnumber">1.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('spi__drv_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">spi_drv.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>SPI DRIVER FOR MPC5604B_MV27.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;MPC5604B_0M27V_0102.h&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
</div>
<p><a href="spi__drv_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct___s_p_i___d_r_v.html">_SPI_DRV</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a407e231521f36cb214629f1c210ebb33"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="spi__drv_8h.html#a407e231521f36cb214629f1c210ebb33">SPI_ERROR</a>()&#160;&#160;&#160;; 	  while(1){}</td></tr>
<tr class="separator:a407e231521f36cb214629f1c210ebb33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga970be944bbbac5f4c297d2ed51af71ee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga970be944bbbac5f4c297d2ed51af71ee"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SPI_BAUD_25000</b>&#160;&#160;&#160;0x29</td></tr>
<tr class="separator:ga970be944bbbac5f4c297d2ed51af71ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaecc4730b81eb512cd6189473a70a2145"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaecc4730b81eb512cd6189473a70a2145"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SPI_BAUD_62500</b>&#160;&#160;&#160;0x09</td></tr>
<tr class="separator:gaecc4730b81eb512cd6189473a70a2145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaead2c547a8d3eb217fe1d5c898245334"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaead2c547a8d3eb217fe1d5c898245334"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SPI_BAUD_100000</b>&#160;&#160;&#160;0x27</td></tr>
<tr class="separator:gaead2c547a8d3eb217fe1d5c898245334"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5ece894b3ae931673cee8e04e4dcb97b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5ece894b3ae931673cee8e04e4dcb97b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SPI_BAUD_500000</b>&#160;&#160;&#160;0x06</td></tr>
<tr class="separator:ga5ece894b3ae931673cee8e04e4dcb97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94dbbc530f6e24997ec477b7417b3466"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga94dbbc530f6e24997ec477b7417b3466"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SPI_BAUD_1000000</b>&#160;&#160;&#160;0x05</td></tr>
<tr class="separator:ga94dbbc530f6e24997ec477b7417b3466"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f88fba39a8fac6bf674df6e525ba09f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8f88fba39a8fac6bf674df6e525ba09f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SPI_BAUD_4000000</b>&#160;&#160;&#160;0x03</td></tr>
<tr class="separator:ga8f88fba39a8fac6bf674df6e525ba09f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9b5018e9d6279fd4f2416aa3891fb106"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group2.html#ga9b5018e9d6279fd4f2416aa3891fb106">SPI_DELAY_DEFAULT</a>&#160;&#160;&#160;0x00080808</td></tr>
<tr class="memdesc:ga9b5018e9d6279fd4f2416aa3891fb106"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default values specified at baud rate of 62500Hz (or higher) for the driver, system clock being 64MHz.  <a href="group__group2.html#ga9b5018e9d6279fd4f2416aa3891fb106">More...</a><br/></td></tr>
<tr class="separator:ga9b5018e9d6279fd4f2416aa3891fb106"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaded631ad24482040bcf4ee3a9620299a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group3.html#gaded631ad24482040bcf4ee3a9620299a">SPI_MAX_DATA_SIZE</a>&#160;&#160;&#160;128</td></tr>
<tr class="separator:gaded631ad24482040bcf4ee3a9620299a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga61732f4cc91effc15fdea77bf11bd6a7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group3.html#ga61732f4cc91effc15fdea77bf11bd6a7">SPI_FRAMESIZE</a>&#160;&#160;&#160;16</td></tr>
<tr class="separator:ga61732f4cc91effc15fdea77bf11bd6a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae8ecf743145569e5b67dadd2f3b37cc7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group4.html#gae8ecf743145569e5b67dadd2f3b37cc7">DSPI0_PORT</a>&#160;&#160;&#160;'A'</td></tr>
<tr class="separator:gae8ecf743145569e5b67dadd2f3b37cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab670645d0590ef0f380f06a9bc1e8ffc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group4.html#gab670645d0590ef0f380f06a9bc1e8ffc">DSPI1_PORT</a>&#160;&#160;&#160;'C'</td></tr>
<tr class="separator:gab670645d0590ef0f380f06a9bc1e8ffc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb12b5473a73d2b6fd70881a6bcd1eaf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group4.html#gabb12b5473a73d2b6fd70881a6bcd1eaf">DSPI2_PORT</a>&#160;&#160;&#160;'E'</td></tr>
<tr class="separator:gabb12b5473a73d2b6fd70881a6bcd1eaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa3f08b6b790aa1596d6f41a122c17aad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa3f08b6b790aa1596d6f41a122c17aad"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group5.html#gaa3f08b6b790aa1596d6f41a122c17aad">initialise_SPI_DRIVER</a> (void)</td></tr>
<tr class="memdesc:gaa3f08b6b790aa1596d6f41a122c17aad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialisation function for SPI driver. Initializes the SPI variable with appropriate assingments on function pointers and activating TCI handler etc. Must be called before doing anything with the driver. <br/></td></tr>
<tr class="separator:gaa3f08b6b790aa1596d6f41a122c17aad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga2365cce3281e8859c38a37edaced7e89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2365cce3281e8859c38a37edaced7e89"></a>
struct <a class="el" href="struct___s_p_i___d_r_v.html">_SPI_DRV</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group5.html#ga2365cce3281e8859c38a37edaced7e89">SPI</a> [3]</td></tr>
<tr class="memdesc:ga2365cce3281e8859c38a37edaced7e89"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI driver instances. Variables defined on the driver structure, providing an Object Oriented user interface for using the driver.<br/>
. <br/></td></tr>
<tr class="separator:ga2365cce3281e8859c38a37edaced7e89"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>SPI DRIVER FOR MPC5604B_MV27. </p>
<dl class="section author"><dt>Author</dt><dd>Serdar SAHIN </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>july 2013</dd></dl>
<p>A driver for transferring 16-bit data arrays (with or without interrupts, to run on the background), with an Object Oriented user interface.</p>
<p>Serdar SAHIN - LAAS - 2013 </p>

<p>Definition in file <a class="el" href="spi__drv_8h_source.html">spi_drv.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a407e231521f36cb214629f1c210ebb33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_ERROR</td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td>&#160;&#160;&#160;; 	  while(1){}</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>An inifite loop that is entered on a detectable error on the driver, usually related to missing or inappropriate user parameters. </p>

<p>Definition at line <a class="el" href="spi__drv_8h_source.html#l00143">143</a> of file <a class="el" href="spi__drv_8h_source.html">spi_drv.h</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_587c94d866dbb2f408f78cf41f9b2f8d.html">drv</a></li><li class="navelem"><a class="el" href="spi__drv_8h.html">spi_drv.h</a></li>
    <li class="footer">Generated on Mon Aug 19 2013 09:51:11 for SPI Driver by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li>
  </ul>
</div>
</body>
</html>
